@import '~antd/lib/style/themes/default.less';

.login {
  :global {
    .ant-tabs .ant-tabs-bar {
      border-bottom: 0;
      margin-bottom: 24px;
      text-align: center;
    }
    .ant-input {
      border: 1px solid #d9d9d9 !important;
    }
    .ant-input {
      &:focus,
      &:active {
        border-color: #1890ff;
      }
    }
    .ant-form-explain {
      position: absolute;
    }
    .ant-input-affix-wrapper {
      padding: 0;
      line-height: 1.5;
      border: 0 none;
      &::before {
        content: '';
      }
    }
    .ant-input-affix-wrapper .ant-input-prefix {
      left: 12px;
      position: absolute;
      top: 50%;
      z-index: 2;
      display: flex;
      align-items: center;
      color: rgba(0, 0, 0, 0.65);
      line-height: 0;
      transform: translateY(-50%);
      margin-right: 0;
    }
    .ant-legacy-form-explain {
      line-height: 0;
    }
    .ant-form-item-explain {
      line-height: 1;
    }
    .ant-input-lg {
      // padding: 6px 11px !important;
      font-size: 16px;
    }
    .ant-input-affix-wrapper .ant-input-prefix :not(.anticon),
    .ant-input-affix-wrapper .ant-input-suffix :not(.anticon) {
      line-height: 1.5;
    }
    .ant-btn-lg {
      padding: 0 15px !important;
    }
  }

  .getCaptcha {
    margin-left: 8px;
    img {
      width: 100%;
      height: 100%;
      display: block;
    }
  }

  .icon {
    font-size: 24px;
    color: rgba(0, 0, 0, 0.2);
    margin-left: 16px;
    vertical-align: middle;
    cursor: pointer;
    transition: color 0.3s;

    &:hover {
      color: @primary-color;
    }
  }

  .other {
    text-align: left;
    margin-top: 24px;
    line-height: 22px;

    .register {
      float: right;
    }
  }

  .prefixIcon {
    color: @disabled-color;
  }

  .submit {
    width: 100%;
  }
}

// 最小宽度1920
@media screen and (min-width: 1921px) {
  .login {
    :global {
      .ant-legacy-form-item {
        margin-bottom: 28px;
        &:not(:nth-last-child(2)) {
          height: 48px !important;
        }
      }
      .ant-input-lg {
        height: 48px !important;
        line-height: 48px !important;
      }
      .ant-input-affix-wrapper .ant-input:not(:first-child) {
        padding-left: 44px;
      }
      .ant-legacy-form-item-control {
        // line-height: 48px;
      }
      .ant-form-item {
        margin-bottom: 28px;
        &:not(:nth-last-child(2)) {
          height: 48px;
        }
      }
      .ant-form-item-control {
        // line-height: 48px;
      }
    }
    .submit {
      margin-top: 32px;
      font-size: 20px;
      height: 48px;
    }
    .prefixIcon {
      font-size: 20px;
    }
    input::-webkit-input-placeholder {
      /* WebKit browsers */
      font-size: 18px;
    }
    input:-moz-placeholder {
      /* Mozilla Firefox 4 to 18 */
      font-size: 18px;
    }
    input::-moz-placeholder {
      /* Mozilla Firefox 19+ */
      font-size: 18px;
    }
    input:-ms-input-placeholder {
      /* Internet Explorer 10+ */
      font-size: 18px;
    }
    .getCaptcha {
      width: 144px;
      height: 48px;
    }
  }
}
// 1600-1920
@media screen and (min-width: 1601px) and (max-width: 1920px) {
  .login {
    :global {
      .ant-legacy-form-item {
        margin-bottom: 26px;
        &:not(:nth-last-child(2)) {
          height: 48px;
        }
      }
      .ant-form-item {
        margin-bottom: 26px;
        &:not(:nth-last-child(2)) {
          height: 48px;
        }
      }
      .ant-input-lg {
        height: 48px !important;
        line-height: 48px !important;
      }
      .ant-input-affix-wrapper .ant-input:not(:first-child) {
        padding-left: 40px;
      }
      .ant-legacy-form-item-control {
        // line-height: 40px;
      }
      .ant-form-item-control {
        // line-height: 40px;
      }
    }
    .submit {
      margin-top: 26px;
      font-size: 18px;
      height: 48px;
    }
    .prefixIcon {
      font-size: 16px;
    }
    input::-webkit-input-placeholder {
      /* WebKit browsers */
      font-size: 16px;
    }
    input:-moz-placeholder {
      /* Mozilla Firefox 4 to 18 */
      font-size: 16px;
    }
    input::-moz-placeholder {
      /* Mozilla Firefox 19+ */
      font-size: 16px;
    }
    input:-ms-input-placeholder {
      /* Internet Explorer 10+ */
      font-size: 16px;
    }
    .getCaptcha {
      width: 120px;
      height: 48px;
    }
  }
}
// 1000-1600
@media screen and (min-width: 1000px) and (max-width: 1600px) {
  .login {
    :global {
      .ant-legacy-form-item {
        margin-bottom: 22px;
        &:not(:nth-last-child(2)) {
          height: 32px;
        }
      }
      .ant-form-item {
        margin-bottom: 22px;
        &:not(:nth-last-child(2)) {
          height: 32px;
        }
      }
      .ant-input-lg {
        height: 32px !important;
        line-height: 32px !important;
      }
      .ant-input-affix-wrapper .ant-input:not(:first-child) {
        padding-left: 36px;
      }
      .ant-legacy-form-item-control {
        // line-height: 32px;
      }
      .ant-form-item-control {
        // line-height: 32px;
      }
      .ant-form-explain {
        font-size: 12px;
      }
    }
    .submit {
      // margin-top: 22px;
      font-size: 16px;
    }
    .prefixIcon {
      font-size: 14px;
    }
    input::-webkit-input-placeholder {
      /* WebKit browsers */
      font-size: 14px;
    }
    input:-moz-placeholder {
      /* Mozilla Firefox 4 to 18 */
      font-size: 14px;
    }
    input::-moz-placeholder {
      /* Mozilla Firefox 19+ */
      font-size: 14px;
    }
    input:-ms-input-placeholder {
      /* Internet Explorer 10+ */
      font-size: 14px;
    }
    .getCaptcha {
      width: 86px;
      height: 32px;
    }
  }
}

// 最大宽度1000
@media screen and (max-width: 1000px) {
  .login {
    :global {
      .ant-legacy-form-item {
        margin-bottom: 22px;
        &:not(:nth-last-child(2)) {
          height: 32px;
        }
      }
      .ant-form-item {
        margin-bottom: 29px;
        &:not(:nth-last-child(2)) {
          height: 32px;
        }
      }
      .ant-input-lg {
        height: calc(48 / 970 * 100vh) !important;
        line-height: calc(48 / 970 * 100vh) !important;
      }
      .ant-input-affix-wrapper .ant-input:not(:first-child) {
        padding-left: 36px;
      }
      .ant-legacy-form-item-control {
        // line-height: 32px;
      }
      .ant-form-item-control {
        // line-height: 32px;
      }
      .ant-form-explain {
        font-size: 12px;
      }
    }
    .submit {
      // margin-top: 22px;
      font-size: 16px;
      height: calc(48 / 970 * 100vh);
    }
    .prefixIcon {
      font-size: 14px;
    }
    input::-webkit-input-placeholder {
      /* WebKit browsers */
      font-size: 14px;
    }
    input:-moz-placeholder {
      /* Mozilla Firefox 4 to 18 */
      font-size: 14px;
    }
    input::-moz-placeholder {
      /* Mozilla Firefox 19+ */
      font-size: 14px;
    }
    input:-ms-input-placeholder {
      /* Internet Explorer 10+ */
      font-size: 14px;
    }
    .getCaptcha {
      width: calc(111 / 500 * 100vw);
      height: calc(48 / 970 * 100vh);
    }
  }
}

// ipad
@media screen and (width: 768px) {
  .login {
    :global {
      .ant-legacy-form-item {
        // margin-bottom: 22px;
        &:not(:nth-last-child(2)) {
          height: auto;
        }
      }
      .ant-form-item {
        // margin-bottom: 22px;
        &:not(:nth-last-child(2)) {
          height: auto;
        }
      }
    }
  }
}
